package com.stylefeng.guns.rest.common.exception;


import com.stylefeng.guns.rest.common.util.StringUtils;

/**
 * 参数异常
 */
@SuppressWarnings("serial")
public class SysException extends RuntimeException{
	private BizExceptionEnum bizExceptionEnum;

	private String attr;

	public BizExceptionEnum getBizExceptionEnum() {
		return bizExceptionEnum;
	}

	public String getAttr() {
		return attr;
	}

	public SysException(BizExceptionEnum bizExceptionEnum, String attr) {
		this.bizExceptionEnum = bizExceptionEnum;
		this.attr = attr;
	}

	public SysException(Throwable e) {
		super(e.getMessage(), e);
	}

	public SysException(String message) {
		super(message);
	}

	public SysException(String messageTemplate, Object... params) {
		super(StringUtils.format(messageTemplate, params));
	}

	public SysException(String message, Throwable throwable) {
		super(message, throwable);
	}

	public SysException(Throwable throwable, String messageTemplate, Object... params) {
		super(StringUtils.format(messageTemplate, params), throwable);
	}
}
